using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Easy.Domain.Test.Models.Mapping;

namespace Easy.Domain.Test.Models
{
    public partial class EFTestContext : DbContext
    {
        static EFTestContext()
        {
            Database.SetInitializer<EFTestContext>(null);
        }

        public EFTestContext()
            : base("Name=EFTestContext")
        {
        }

        public DbSet<Blog> Blogs { get; set; }
        public DbSet<Post> Posts { get; set; }
        public DbSet<VBlog> VBlogs { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new BlogMap());
            modelBuilder.Configurations.Add(new PostMap());
            modelBuilder.Configurations.Add(new VBlogMap());
        }
    }
}
